var usernameInput = document.getElementsByClassName('username')[0]; 
var passwordInput = document.getElementsByClassName('password')[0]; 
var loginBtn = document.getElementsByClassName('login')[0];

loginBtn.addEventListener('click',function(){
    var username=usernameInput.value
    var password=passwordInput.value
    myAjax('post','/login',{username,password}).then((data)=>{
        alert(data)
        location.href='/admin'
    })
})